package itsm.isperp.module.service.bpm;

import itsm.isperp.framework.data.domain.DataResponse;
import itsm.isperp.framework.service.BaseService;
import itsm.isperp.framework.web.request.JqGridFilterRuleOp;
import itsm.isperp.framework.web.request.JqGridRequest;
import itsm.isperp.module.entity.bpm.BpmRelationProcessMapField;
import itsm.isperp.module.repository.bpm.BpmRelationProcessMapFieldMapper;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 服务
 * 
 * @author lizx
 * @date 2015-02-03 11:13
 */
@Service
public class BpmRelationProcessMapFieldService extends
		BaseService<BpmRelationProcessMapField> {

	@Autowired
	protected BpmRelationProcessMapFieldMapper bpmRelationProcessMapFieldMapper;

	@Override
	public BpmRelationProcessMapFieldMapper getRepository() {
		return this.bpmRelationProcessMapFieldMapper;
	}

	public DataResponse<BpmRelationProcessMapField> findByRelationProcessMapId(
			String relationProcessMapId) {
		JqGridRequest request = new JqGridRequest();
		request.addFilterRule("relationProcessMapId", JqGridFilterRuleOp.eq,
				relationProcessMapId);
		request.isPageable(false);
		return this.findAll(request);
	}

}
